In [1]:
import sys
import pickle

import ncserialisable
sys.modules['netCDF4'] = ncserialisable

from IPython.parallel import Client

c = Client()
dv = c[0]
dv.activate()
dv.block = True

with dv.sync_imports():
    import mkserialisable


importing mkserialisable on engine(s)

In [2]:
mkserialisable.mk_cf()
%px mkserialisable.mk_cf()
with dv.sync_imports():
    import cf


importing cf on engine(s)

In [3]:
f = cf.read('/data/cmip5/output1/MOHC/HadGEM2-ES/rcp85/mon/atmos/' \
            'Amon/r1i1p1/v20111215/tas/tas_Amon_HadGEM2-ES_rcp85_' \
            'r1i1p1_*-*.nc')[0]

In [4]:
a, b = dv.apply(lambda x: (x.space, x.array[:3,:3,:3]), f)
print a.values()[2].array[5:10]
print b


[ 70725.  70755.  70785.  70815.  70845.]
[[[ 257.95141602  257.95141602  257.95141602]
  [ 258.85772705  258.83319092  258.79760742]
  [ 259.5692749   259.50787354  259.43859863]]

 [[ 258.05053711  258.05053711  258.05053711]
  [ 258.92315674  258.90112305  258.87573242]
  [ 259.61993408  259.55413818  259.4833374 ]]

 [[ 243.19805908  243.19805908  243.19805908]
  [ 244.18640137  244.1494751   244.1184082 ]
  [ 245.08178711  244.97479248  244.87915039]]]